<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>progress状态交互元素</title>
</head>
<body>
<p id="pTip">开始下载</p>
<progress value="0" max="100" id="proDownFile"></progress>
<input type="button" value="DownLoad btn" class="inputButton" onclick="Btn_Click();">

<script type="text/javascript">
	var intValue = 0;
	var intTimer;
	var objPro = document.getElementById('proDownFile');
	var objTip = document.getElementById('pTip');
	// Timer event
	function Interval_handler()
	{
		intValue++;
		objPro.value = intValue;
		if (intValue >= objPro.max)
		{
			clearInterval(intTimer);
			objTip.innerHTML = "已下载完成";
		}
		else
		{
			objTip.innerHTML = "正在下载中" + intValue + "%";
		}
	}
	function Btn_Click()
	{
		intTimer = setInterval(Interval_handler, 100);
	}
</script>
</body>
</html>